(function (aopc) {
    aopc.addExpandPage(814, function (get) {
        return {
            expandInit() {
                this.container_view = this.getProperty('container_view');
                this.start_button = this.getProperty('start_button');
            },
            expandDataLoad({ data }) {
                if (data.MeetingId) {
                    if (!data.WelcomeBackImageUrl) {
                        if(this.theme==='red')data.WelcomeBackImageUrl = 'images/yxinmt_h5/25081616162200761.jpg';
                        else data.WelcomeBackImageUrl = 'images/yxinmt_h5/24111120500579060.jpg';
                    }
                    this.container_view.style.backgroundImage = `url(${data.WelcomeBackImageUrl})`;
                    this.container_view.refresh();
                    this.entityData = data;
                    this.start_button.setIsVisible(true);
                    window.meetingDeviceUser = data;
                }
            },
            entryMeeting({ property }) {
                if (property.isLoading) return;
                const { IsInSign, MeetingId } = this.entityData;
                const { serviceName, actionName } = property.serviceInterface;
                const entityData = { MeetingId };
                const url = 'MeetingWelcome/Insert2';

                property.isLoading = true;

                this.dispatchAction(serviceName, actionName, { MeetingWelcome: entityData, url }).then(res => {
                    if (res && res.isSuccess !== false) {
                        const backUrl = encodeURIComponent(this.pageData.backUrl || '/index.html');
                        if (IsInSign) this.toPage('/userSign.html?MeetingId=' + MeetingId + `&backUrl=${backUrl}`);
                        else this.replacePage('/meetingSubjectList.html?MeetingId=' + MeetingId);
                    }
                });
            },
            expandGetMeetingData({ entityData }) {
                if (this.pageData.isStart === 'true') entityData.queryString = "IsStart=true";
                return entityData;
            }
        }
    });
})(window.aopc);